from selenium import webdriver
import time,os

if __name__ == "__main__":
 browser = webdriver.Firefox(executable_path=r"C:\Program Files\Python\Python38\Scripts\geckodriver.exe",log_path=r'D:\log\webdriver.log')
 browser.get("https://www.ums86.com/index.jsp")
 spCode = browser.find_element_by_id('accname')
 spCode.clear()
 spCode.send_keys("258798")
 user_name = browser.find_element_by_id('userName')
 user_name.clear()
 user_name.send_keys("ly_rmfy")
 password = browser.find_element_by_id('password')
 password.clear()
 password.send_keys("LYrmf")
 time.sleep(10)
 browser.find_element_by_class_name('login_btn').submit()
 time.sleep(1)


 picture_url=browser.get_screenshot_as_file('D:\\1232.png')
 print("%s：截图成功！！！" % picture_url)










 # browser = webdriver.Firefox(executable_path=r"C:\Program Files\Python\Python38\Scripts\geckodriver.exe")
 # browser.add_cookie({'name' : 'epsessionidk', 'value' : 'BB89A120D16686D49C654700563F1398'})
 # browser.add_cookie({'name' : 'FLAGINFO_EPS', 'value' : 'epv5_ssl2'})
 # browser.add_cookie({'name' : 'loginMsg', 'value' : '1'})
 # browser.add_cookie({'name' : 'mclrt', 'value' : '1588842285796'})
 # browser.get("https://www.ums86.com/main/index.do")
 # a = browser.find_element_by_link_text('e信').click()
 # time.sleep(1)

